/**
 * @Description
 * @Author zhaobaolin
 * @Date 2018/12/1
 */
public class MethodExample {
    public static void main(String[] args) {
        //demo();
        //demo1();
        demo2();
    }

    public static void demo() {
        String name = "小明";
        int age = 15;

        User user = MyInfo::name;
        String info = user.userInfo(name, age);
        System.out.println(info);

        String outStr = userThink(MyInfo::name, name, age);
        System.out.println(outStr);
    }

    public static String userThink(User user, String name, int age) {
        return user.userInfo(name, age);
    }

    public static void demo1() {
        StudentInterface2 studentInterface = Student::new;
        Student student = studentInterface.getStudent("小明");
        System.out.println(student.getName() + student.getGrade());
    }

    public static void demo2() {
        String name = "小明";
        int age = 16;
        double a = 16.6;
        MyUser<Integer> user = MyInfo2::<Integer>name;
        String info = user.userInfo(name, age);
        System.out.println(info);

    }
}
